{% extends 'myadmin/base/content_base.html' %}
{% load static %}
{#{% load admin_customer_tags %}#}
{% block page_header %}
    系统设置
{% endblock %}
{% block page_option %}
    用户管理
{% endblock %}
{% block content %}
    <div class="box box-primary">
        <div class="box-header with-border">
            <li style="color:red;;">点击组开通管理权限，W 开通课件不能选择课程大类</li>
            <h3 class="box-title">用户详情</h3>
        </div>
        <!-- /.box-header -->
        <!-- form start -->
        <div class="box-body">
            <div class="row">
                <div class="col-md-3"></div>
                <div class="col-md-6">
                    <form class="form-horizontal">
                        {% csrf_token %}

                        {% for field in form %}
                            {% if field.name in 'is_staff,is_active,is_superuser' %}
                                <div class="form-group">

                                    <div class="col-sm-offset-2 col-sm-10">

                                        <div class="checkbox">
                                            <label for="{{ field.id_for_label }}">{{ field }}{{ field.label }}</label>
                                        </div>
                                    </div>

                                </div>
                            {% else %}
                                <div class="form-group {% if field.errors %}has-error{% endif %}">

                                    <label for="{{ field.id_for_label }}"
                                           class="col-sm-2 control-label">{{ field.label }}</label>

                                    <div class="col-sm-10">
                                        {% for error in field.errors %}
                                            <label class="control-label"
                                                   for="{{ field.id_for_label }}">{{ error }}</label>
                                        {% endfor %}
                                        {{field}}
                                    </div>
                                </div>
                            {% endif %}
                        {% endfor %}


                    </form>
                </div>
                <div class="col-md-3"></div>
            </div>
        </div>
        <div class="box-footer">

                    <button type="button" class="btn btn-default back">返回</button>
                    <button type="button" class="btn btn-primary pull-right save
                                                 " data-url="{% url 'myadmin:user_update' form.instance.id %}">保存</button>


        </div>
    </div>
{% endblock %}
{% block script %}
    <script src="{% static 'js/myadmin/user_detail.js' %}"></script>
{% endblock %}